class data {
    // 添加节点和边
    static addGraphData(source, x, y) {
        return {
            nodes: [
                {
                    id: '1',
                    type:"circle",
                    style: {
                        size: 70,
                        x: x - 140,
                        y: y - 100,
                        labelFontSize: 24,
                        label: true,
                        labelText: '生平',
                        labelFill: "#cea737",
                        fill: "rgba(255,255,255,0.3)",
                        stroke: "red",
                        originalProperties: {
                            nodeType: 'btn',
                            linkType: '1',
                            source: source
                        }
                    }
                },
                {
                    id: '2',
                    type:"circle",
                    style: {
                        x: x,
                        y: y - 150,
                        size: 70,
                        labelFontSize: 24,
                        labelFill: "#cea737",
                        fill: "rgba(255,255,255,0.3)",
                        labelText: '文物',
                        stroke: "red",
                        originalProperties: {
                            nodeType: 'btn',
                            linkType: '2',
                            source: source
                        }
                    }
                },
                {
                    id: '3',
                    type:"circle",
                    style: {
                        x: x + 140,
                        y: y - 100,
                        size: 70,
                        labelText: '文献',
                        labelFontSize: 24,
                        fill: "rgba(255,255,255,0.3)",
                        labelFill: "#cea737",
                        labelOffsetY: 20,
                        stroke: "red",
                        originalProperties: {
                            nodeType: 'btn',
                            linkType: '3',
                            source: source
                        }
                    }
                },
                {
                    id: '4',
                    type:"circle",
                    style: {
                        x: x + 110,
                        y: y + 110,
                        size: 70,
                        labelText: '足迹',
                        stroke: "red",
                        fill: "rgba(255,255,255,0.3)",
                        labelFill: "#cea737",
                        labelFontSize: 24,
                        originalProperties: {
                            nodeType: 'btn',
                            linkType: '4',
                            source: source
                        }
                    }
                },
                {
                    id: '5',
                    type: 'circle',
                    style: {
                        size: 70,
                        x: x - 110,
                        y: y + 110,
                        labelText: '关系',
                        labelFill: "#cea737",
                        stroke: "red",
                        fill: "rgba(255,255,255,0.3)",
                        labelFontSize: 24,
                        originalProperties: {
                            nodeType: 'btn',
                            linkType: '5',
                            source: source
                        }
                    }
                },

            ],
            edges: [
                {
                    id: '11',
                    source: source,
                    target: '1',
                },
                {
                    id: '22',
                    source: source,
                    target: '2',
                },
                {
                    id: '33',
                    source: source,
                    target: '3',
                },
                {
                    id: '44',
                    source: source,
                    target: '4',
                },
                {
                    id: '55',
                    source: source,
                    target: '5',
                },
            ]
        }
    }
}

export default data
